package org.lalib.controller.form;

import java.util.List;

import org.lalib.acquire.IControllerForm;
import org.lalib.entity.object.EOrder;
import org.lalib.entity.object.EUser;
import org.springframework.stereotype.Controller;

@Controller("cCookerForm")
public class CCookerForm implements IControllerForm {

	private static final long serialVersionUID = 1L;

	private EUser user;
	private EOrder currentOrder;
	private List<EOrder> orders;
	private List<CookerFoodBean> cookerFoodBeans;

	private String foodName = "";
	private String description = "";

	public EUser getUser() {
		return user;
	}

	public void setUser(EUser user) {
		this.user = user;
	}

	public List<EOrder> getOrders() {
		return orders;
	}

	public void setOrders(List<EOrder> orders) {
		this.orders = orders;
	}

	public List<CookerFoodBean> getCookerFoodBeans() {
		return cookerFoodBeans;
	}

	public void setCookerFoodBeans(List<CookerFoodBean> cookerFoodBeans) {
		this.cookerFoodBeans = cookerFoodBeans;
	}

	public EOrder getCurrentOrder() {
		return currentOrder;
	}

	public void setCurrentOrder(EOrder currentOrder) {
		this.currentOrder = currentOrder;
	}

	public String getFoodName() {
		return foodName;
	}

	public void setFoodName(String foodName) {
		this.foodName = foodName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public class CookerFoodBean {
		private String foodName = "";
		private Long orderId;
		private boolean selected = false;

		public CookerFoodBean(String foodName, Long orderId) {
			setFoodName(foodName);
			setOrderId(orderId);
		}

		public String getFoodName() {
			return foodName;
		}

		public void setFoodName(String foodName) {
			this.foodName = foodName;
		}

		public Long getOrderId() {
			return orderId;
		}

		public void setOrderId(Long orderId) {
			this.orderId = orderId;
		}

		public boolean isSelected() {
			return selected;
		}

		public void setSelected(boolean selected) {
			this.selected = selected;
		}
	}
}
